package com.szq.netty.service;

import com.szq.netty.domain.MsgAgreement;
import com.szq.netty.redis.Publisher;
import com.szq.netty.redis.RedisUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName: ExtServerService
 * @Description:
 * @Author: szq
 * @Date: 2021-11-18 15:44:32
 */
@Service("extServerService")
public class ExtServerService {

    @Resource
    private Publisher publisher;
    @Resource
    private RedisUtil redisUtil;

    public void push(MsgAgreement msgAgreement){
        publisher.pushMessage("netty-demo-push-msgAgreement", msgAgreement);
    }

    public RedisUtil getRedisUtil() {
        return redisUtil;
    }
}
